/**
 */
package fUML.Semantics.Activities.IntermediateActivities;

import org.eclipse.emf.common.util.EList;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Object Node Activation</b></em>'.
 * <!-- end-user-doc -->
 *
 * <!-- begin-model-doc -->
 * An object node activation is an activity node activation for a node that is an
 *                 object node.
 * <!-- end-model-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link fUML.Semantics.Activities.IntermediateActivities.ObjectNodeActivation#getOfferedTokenCount <em>Offered Token Count</em>}</li>
 * </ul>
 * </p>
 *
 * @see fUML.Semantics.Activities.IntermediateActivities.IntermediateActivitiesPackage#getObjectNodeActivation()
 * @model abstract="true"
 * @generated
 */
public interface ObjectNodeActivation extends ActivityNodeActivation {
	/**
	 * Returns the value of the '<em><b>Offered Token Count</b></em>' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * The number of held tokens that have already been offered.
	 * <!-- end-model-doc -->
	 * @return the value of the '<em>Offered Token Count</em>' attribute.
	 * @see #setOfferedTokenCount(int)
	 * @see fUML.Semantics.Activities.IntermediateActivities.IntermediateActivitiesPackage#getObjectNodeActivation_OfferedTokenCount()
	 * @model required="true" ordered="false"
	 * @generated
	 */
	int getOfferedTokenCount();

	/**
	 * Sets the value of the '{@link fUML.Semantics.Activities.IntermediateActivities.ObjectNodeActivation#getOfferedTokenCount <em>Offered Token Count</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Offered Token Count</em>' attribute.
	 * @see #getOfferedTokenCount()
	 * @generated
	 */
	void setOfferedTokenCount(int value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model required="true" ordered="false"
	 * @generated
	 */
	int countOfferedValues();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Send offers over all outgoing edges, if there are any tokens to be
	 *                   offered.
	 *  
	 *  TokenList tokens = this.getUnofferedTokens();
	 *                   this.offeredTokenCount = this.offeredTokenCount + tokens.size();
	 *                   
	 *  this.sendOffers(tokens);
	 *  
	 * <!-- end-model-doc -->
	 * @model
	 * @generated
	 */
	void sendUnofferedTokens();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Return the number of unoffered tokens that are to be offered next.
	 *                   // (By default, this is all unoffered tokens.)
	 *  
	 *  if
	 *                   (this.heldTokens.size() == 0) {
	 *  this.offeredTokenCount = 0;
	 *                   }
	 *  
	 *  return this.heldTokens.size() -
	 *                   this.offeredTokenCount;
	 *  
	 * <!-- end-model-doc -->
	 * @model required="true" ordered="false"
	 * @generated
	 */
	int countUnofferedTokens();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Get the next set of unoffered tokens to be offered and return it.
	 *                   // [Note: This effectively treats all object flows as if they have weight=*,
	 *                   rather than the weight=1 default in the current superstructure
	 *                   semantics.]
	 *  
	 *  TokenList tokens = new TokenList();
	 *                   
	 *  int i = 1;
	 *  while (i <= this.countUnofferedTokens())
	 *                   {
	 *  tokens.addValue(this.heldTokens.getValue(this.offeredTokenCount + i -
	 *                   1));
	 *  i = i + 1;
	 *  }
	 *  
	 *  return tokens;
	 *                 
	 * <!-- end-model-doc -->
	 * @model kind="operation" ordered="false"
	 * @generated
	 */
	EList<Token> getUnofferedTokens();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model ordered="false"
	 * @generated
	 */
	EList<Token> takeUnofferedTokens();

} // ObjectNodeActivation
